
module.exports = {
  Modal: function (showCancel, content, confirm, cancel) {
    wx.showModal({
      title: "提示",
      content: content,
      showCancel: showCancel,
      confirmText: "确定",
      confirmColor: "#ff6688",
      success: function (res) {
        console.log(res);
        if (res.confirm){
           confirm();
        }else if(res.cancel){
            cancel()
        }
      }
    })
  },
  //提示-跳转
  hintToggle: function (icon, page, mode) {
    wx.showToast({
      title: "提示",
      icon: icon,
    })
    setTimeout(function () {
      if (typeof mode == 'undefined' || mode == 0) {
        wx.navigateTo({
          url: page,
        })
      } else {
        wx.switchTab({
          url: page,
        });
      }
    }, 1500);
  },
  //提示
  hintTxt: function (title, icon) {
    wx.showToast({
      title: title,
      icon: icon,
    })
  },


}